package com.group.result;

import lombok.Getter;

@Getter
public enum ResultEnum {
    SUCCESS(0,"成功"),
    OPTION_FAIL(500,"失败"),
    PARAM_ERROR(501,"参数错误"),
    PARAM_NULL(502,"参数为空"),
    PARAM_NOT_FOUND(503,"参数未找到"),
    PARAM_NOT_MATCH(504,"参数不匹配"),
    PARAM_NOT_EXIST(505,"参数不存在"),
    PARAM_NOT_VALID(506,"参数不合法"),
    PARAM_NOT_UNIQUE(507,"参数不唯一"),
    PARAM_NOT_EXISTS(508,"参数不存在"),
    ID_NOT_EMPTY(509,"id不能为空"),

    USER_NOT_EXISTS(601,"用户不存在"),
    USER_NOT_LOGIN(602,"用户未登录"),
    USER_NOT_ADMIN(603,"用户不是管理员"),
    USER_NOT_OWNER(604,"用户不是业主"),
    USER_NOT_CAR(605,"用户不是车主"),
    USER_NOT_BUILDING(606,"用户不是楼主"),
    USER_NOT_community(607,"用户不是小区长"),
    USER_NOT_HOUSE(608,"用户不是房主"),

    USER_EXISTS(701,"用户已存在"),
    USER_PASSWORD_ERROR(702,"密码错误"),
    USER_PASSWORD_NOT_MATCH(703,"密码不匹配"),
    USER_PASSWORD_NOT_SAME(704,"密码不一致"),
    USER_PASSWORD_NOT_VALID(705,"密码不合法"),
    USER_PASSWORD_NOT_EXISTS(706,"密码不存在"),
    USER_PASSWORD_NOT_FOUND(707,"密码未找到"),
    USER_PASSWORD_NOT_NULL(708,"密码为空"),

    USER_EMAIL_ERROR(801,"邮箱错误"),
    USER_EMAIL_NOT_MATCH(802,"邮箱不匹配"),
    USER_EMAIL_NOT_SAME(803,"邮箱不一致"),
    USER_EMAIL_NOT_VALID(804,"邮箱不合法"),
    USER_EMAIL_NOT_EXISTS(805,"邮箱不存在"),
    USER_EMAIL_NOT_FOUND(806,"邮箱未找到"),
    USER_EMAIL_NOT_EMPTY(807,"邮箱不能为空"),
    USER_EMAIL_IS_EXISTS(808,"邮箱已经使用!"),

    USER_PHONE_ERROR(901,"手机号错误"),
    USER_PHONE_NOT_MATCH(902,"手机号不匹配"),
    USER_PHONE_NOT_SAME(903,"手机号不一致"),
    USER_PHONE_NOT_VALID(904,"手机号不合法"),
    USER_PHONE_NOT_EXISTS(905,"手机号不存在"),
    USER_PHONE_NOT_FOUND(906,"手机号未找到"),
    USER_PHONE_IS_EXISTS(907,"手机号码已经使用!"),
    USER_PHONE_NOT_EMPTY(908,"手机号不能为空"),

    USER_NAME_ERROR(1001,"姓名错误"),
    USER_NAME_NOT_MATCH(1002,"姓名不匹配"),
    USER_NAME_NOT_SAME(1003,"姓名不一致"),
    USER_NAME_NOT_VALID(1004,"姓名不合法"),
    USER_NAME_NOT_EXISTS(1005,"姓名不存在"),
    USER_NAME_NOT_FOUND(1006,"姓名未找到"),
    USER_NAME_NOT_NULL(1007,"姓名为空"),
    USERNAME_NOT_EMPTY(1008,"用户名不能为空"),
    USERNAME_IS_EXISTS(1009,"用户名已存在"),

    USER_IMAGE_ERROR(1101,"头像错误"),
    USER_IMAGE_NOT_MATCH(1102,"头像不匹配"),
    USER_IMAGE_NOT_SAME(1103,"头像不一致"),
    USER_IMAGE_NOT_VALID(1104,"头像不合法"),
    USER_IMAGE_NOT_EXISTS(1105,"头像不存在"),
    USER_IMAGE_NOT_FOUND(1106,"头像未找到"),
    USER_IMAGE_NOT_NULL(1107,"头像为空"),

    USERNAME_PASSWORD_NOT_MATCH(1108,"用户名密码不匹配"),
    VALIDATE_FAIL(20003,"校验失败!"),
    FILE_TYPE_ERROR(20004,"上传文件的格式不合法!"),
    UNKNOWN_EXCEPTION(5000,"对不起，系统繁忙，请稍后再来!"),
    INNER_ERROR(5001,"你插入的关联数据不合法"),
    LOAD_FILE_FAIL(50001,"加载配置文件失败!"),


    TOKEN_ERROR(4000,"token错误"),
    TOKEN_EXPIRED(4001,"token过期"),
    TOKEN_NOT_EMPTY(4002,"token不能为空"),



    ADMIN_NOT_EXISTS(1200,"管理员不存在"),
    ADMIN_INFO_NOT_EMPTY(1201,"管理员信息不能为空"),
    No_PERMISSION(1202, "权限不足");

    private final Integer code;
    private final String message;
    ResultEnum(Integer code,String message){
        this.code = code;
        this.message = message;
    }
}
